package com.vince.tv.entity;


import com.vince.tv.Constant;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Document("movies")
public class Movie {

    private String id;
    private String category;
    private String path;
    private String size;
    private Integer count;
    private String status;
    private String m3u8Url;


    public static void initM3u8Url(Movie movie) {
        movie.setM3u8Url(String.format(Constant.M3U8_URL_FORMAT, movie.getId()));
    }
}
